# Copyright (c) 2021 HPMicro
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.13)

if("${CMAKE_BUILD_TYPE}" STREQUAL "")
    SET(CMAKE_BUILD_TYPE flash_xip)
endif()

#set(SES_TOOLCHAIN_VARIANT "Andes")

#set(CONFIG_HPM_MATH 1)
#set(CONFIG_HPM_MATH_DSP 1)
#set(HPM_MATH_DSP_SES_LIB "libdspf")
find_package(hpm-sdk REQUIRED HINTS $ENV{HPM_SDK_BASE})

project(hpm_yuangan)
#sdk_ses_compile_options(-mabi=ilp32f)
#sdk_ses_compile_options(-march=rv32imafc)

sdk_app_inc(../common)

sdk_app_src(../common/multicore_common.c)
sdk_app_src(src/main.c)
sdk_app_src(src/adc.c)
sdk_app_src(src/timer.c)
sdk_app_src(src/sec_core_img.c)
sdk_compile_options("-O3")
generate_ses_project()
